package com.longge;

/**
 * @program: my-code
 * @description:
 * @author: longge
 * @create: 2021-05-08 02:44
 */
public class ReplaceDigits {

    public String replaceDigits(String s) {

        char[] chars = s.toCharArray();
        for (int i = 0; i < chars.length-1; i += 2) {

            chars[i + 1] = (char) (chars[i] + chars[i + 1] - '0');
        }
        return new String(chars);
    }
}
